package mockobject;

import static org.junit.Assert.*;

import org.junit.Test;

import educationlogic.checkallclassesel.Student;

public class StudentTester {
	 public void testStudent() {
	    	MockCheckMyClasses my = new MockCheckMyClasses();
	    	MockCheckAllClass all = new MockCheckAllClass();
	    	MockSelectClass select = new MockSelectClass();
	    	MockQuitClass quit = new MockQuitClass();
	    	String s1 = "1000|数学|软件学院|2012|必修||";
	    	String s2 = "1001|物理|物理学院|2012|选修||";
	    	String s3 = "1002|英语|外语学院|2012|通识";
	    	int a[] = {1000};
	    	int b[] = {1001};
	    	int c[] = {1000, 1001};
	    	assertEquals(my.checkMy(a), s1);
	    	assertEquals(my.checkMy(b), s2);
	    	assertEquals(my.checkMy(c), s1 + s2);
	    	assertEquals(all.checkAll(a), s1);
	    	assertEquals(all.checkAll(b), s2);
	    	assertEquals(all.checkAll(c), s1 + s2);
	    	assert(select.select(1000));
	    	assert(!select.select(1003));
	    	assert(quit.quitClass(1000));
	    	assert(!quit.quitClass(1003));
	    }
	
}
